<?php
include "../config/koneksi.php";
include "../class/hubungi_kami.php";

$kontak_dao=new Kontak_Dao();
$list=$kontak_dao->get_all();

?>
<html>
<head>
<title>Daftar Isi Pesan </title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<table width="100%" height="30" border="0" cellpadding="0" cellspacing="0">
  <tr> 
      
    <td height="30""> 
      <div align="left"><font size="3" face="tahoma">Daftar Isi Pesan<br></font><hr color=#CCCCFF>
     </div></td>
    </tr>
  </table>
<div align=center>
	<table class="table table-bordered">
<div align=center>
<table border=1 cellpadding=0 cellspacing=0 style=border-collapse: collapse width=100% id=AutoNumber1>
		<tr>
			<td width=3% bgcolor=#999999>
			<font face=Tahoma color=#FFFFFF size=2>No.</font></td>
			<td width=17% bgcolor=#999999 align=center>
			<font face=Tahoma color=#FFFFFF size=2>Nama </font></td>
			<td bgcolor=#999999 align=center style=border-style: none; border-width: medium width=30%>
			<font face=Tahoma color=#FFFFFF size=2>Email</font></td>
			<td bgcolor=#999999 align=center style=border-style: none; border-width: medium width=25%>
			<font face=Tahoma color=#FFFFFF size=2>Isi Pesan</font></td>
			<td bgcolor=#999999 align=center style=border-style: none; border-width: medium width=25%>
			<font face=Tahoma color=#FFFFFF size=2>Tanggal</font></td>
			
			<td bgcolor=#999999 align=center style=border-style: none; border-width: medium colspan=2 width=10%>
			<font face=Tahoma color=#FFFFFF size=2>Aksi</font></td>
		</tr>

	<?php
	$i=1;
	foreach($list as $list2){
	$id_hubungi=$list2->id_hubungi;
	$pesan=$list2->pesan;
	$pesan=substr($pesan,0,10);

	?>
	<tr>
		<td width=3% style=border-style: none; border-width: medium align=center valign=top><font face=Tahoma size=2><?php echo $i;?></font></td>
		<td style=border-style: none; border-width: medium width=17% align=left valign=top><?php echo $list2->nama; ?></font></td>
		<td style=border-style: none; border-width: medium width=17% align=left valign=top><?php echo $list2->email; ?></font></td>
		<td style=border-style: none; border-width: medium width=17% align=left valign=top><?php echo $pesan; ?>...</font></td>
		<td style=border-style: none; border-width: medium width=17% align=left valign=top><?php echo $list2->tanggal; ?></font></td>
		<td style=border-style: none; border-width: medium align=center width=10%>                                                              
		<td><?php echo"<a href=index.php?menu=view_hubungilengkap&id_hubungi=$list2->id_hubungi><img border=0 src=../images/view.png></a>";?></td>
	</tr>
<?php $i++;}?>

	</table>
</body>
</html>